package SV_XXE_SPF;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;

public class Fixed {
    public class Test {
        public void test() throws SAXException, ParserConfigurationException {
            SAXParserFactory spf = SAXParserFactory.newInstance();

            spf.setFeature("http://xml.org/sax/features/external-general-entities", false);
            spf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
            spf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);

            spf.newSAXParser();
        }
    }

}
